# Copyright 2019 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

load("//build_tools/bazel:build_defs.oss.bzl", "iree_runtime_cc_library")

package(
    default_visibility = ["//visibility:public"],
    features = ["layering_check"],
    licenses = ["notice"],  # Apache 2.0
)

iree_runtime_cc_library(
    name = "debugging",
    srcs = ["debugging.c"],
    hdrs = ["debugging.h"],
    deps = [
        "//runtime/src/iree/base",
        "//runtime/src/iree/hal",
        "//runtime/src/iree/vm",
    ],
)

iree_runtime_cc_library(
    name = "hal",
    srcs = [
        "module.c",
    ],
    hdrs = [
        "module.h",
    ],
    textual_hdrs = [
        "exports.inl",
    ],
    deps = [
        ":debugging",
        ":types",
        "//runtime/src/iree/base",
        "//runtime/src/iree/hal",
        "//runtime/src/iree/modules/hal/utils:buffer_diagnostics",
        "//runtime/src/iree/vm",
    ],
)

iree_runtime_cc_library(
    name = "types",
    srcs = ["types.c"],
    hdrs = ["types.h"],
    deps = [
        "//runtime/src/iree/base",
        "//runtime/src/iree/hal",
        "//runtime/src/iree/vm",
    ],
)
